Fixed file upload tests#538
Merged
xperiandri merged 5 commits intofsprojects:devfrom Oct 3, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes tests for file upload processing by updating the GraphQL upload type name from "Upload" to "File" and adding missing properties to the FileData type. The changes ensure that file upload functionality works correctly across the test suite by removing temporary "Skip" attributes from tests and updating schema definitions.
- Updated the upload type name consistently from "Upload" to "File" throughout the codebase
- Added FileName property to FileData type to support file identification
- Fixed test mocks to include the new FileName property in file creation
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/FSharp.Data.GraphQL.Tests/Helpers.fs | Updated mock input context to include FileName property in file responses |
| tests/FSharp.Data.GraphQL.Tests/FileTests.fs | Changed FileType to File in mutation variable type and removed BOM character |
| tests/FSharp.Data.GraphQL.IntegrationTests/introspection.json | Updated document ID reflecting schema changes |
| tests/FSharp.Data.GraphQL.IntegrationTests/LocalProviderWithOptionalParametersOnlyTests.fs | Changed Upload type to File and re-enabled previously skipped tests |
| tests/FSharp.Data.GraphQL.IntegrationTests/LocalProviderTests.fs | Updated type references and re-enabled tests with some cleanup |
| tests/FSharp.Data.GraphQL.IntegrationTests/Helpers.fs | Enhanced File type with MakeUpload method supporting optional upload name parameter |
| tests/FSharp.Data.GraphQL.IntegrationTests/FSharp.Data.GraphQL.IntegrationTests.fsproj | Disabled some test files and commented out release build references |
| tests/FSharp.Data.GraphQL.IntegrationTests.Server/Startup.fs | Replaced hardcoded header with dynamic request type detection |
| tests/FSharp.Data.GraphQL.IntegrationTests.Server/Schema.fs | Major schema refactor replacing Upload with FileType and implementing proper mutation handlers |
| tests/FSharp.Data.GraphQL.IntegrationTests.Server/FSharp.Data.GraphQL.IntegrationTests.Server.fsproj | Removed CustomSchemaTypes.fs and added user secrets |
| tests/FSharp.Data.GraphQL.IntegrationTests.Server/CustomSchemaTypes.fs | Deleted file containing old Upload type definition |
| src/FSharp.Data.GraphQL.Shared/SchemaDefinitions.fs | Renamed FileType to File and improved variable handling with null checks |
| src/FSharp.Data.GraphQL.Shared/InputContext.fs | Added FileName property to FileData type and removed BOM character |
| src/FSharp.Data.GraphQL.Server/FSharp.Data.GraphQL.Server.fsproj | Added FsToolkit.ErrorHandling package reference |
| src/FSharp.Data.GraphQL.Server.Giraffe/HttpHandlers.fs | Added multipart request detection and dynamic request type header setting |
| src/FSharp.Data.GraphQL.Server.AspNetCore/StartupExtensions.fs | Added HttpContextRequestExecutionContext service registration |
| src/FSharp.Data.GraphQL.Server.AspNetCore/RequestExecutionContext.fs | Enhanced file handling with FileName property and memory stream usage |
| src/FSharp.Data.GraphQL.Client/Upload.fs | Major refactor adding Name property, optional parameters, and improved constructor overloads |
| src/FSharp.Data.GraphQL.Client/Serialization.fs | Changed Upload serialization from null to Name property |
| src/FSharp.Data.GraphQL.Client/MimeTypes.fs | Minor formatting improvement |
| src/FSharp.Data.GraphQL.Client/GraphQLClient.fs | Enhanced multipart request handling with proper file naming and content disposition |
| src/FSharp.Data.GraphQL.Client.DesignTime/ProvidedTypesHelper.fs | Updated type mapping and error handling for upload types |
xperiandri
requested changes
Oct 3, 2025
xperiandri
requested changes
Oct 3, 2025
xperiandri
requested changes
Oct 3, 2025
xperiandri
approved these changes
Oct 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.